package com.forekonw.demo10;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Datedemo {
    public static void main(String[] args) {
        Date date = new Date();
        System.out.println(date);
        //如何对日期进行格式化
        SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd");
        String a = s.format(date);
        System.out.println(a);
    }
}
